From d1f2e8c47643cc87b1238b536da8ad2026b2e74f Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 5 Mar 2010 14:35:44 +0000 Subject: [PATCH] xl: Fix undefined behaviour when pci not specified in input file Signed-off-by: Ian Jackson --- tools/libxl/xl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/xl.c b/tools/libxl/xl.c index 6e88c6ee6a..2e23da3307 100644 --- a/tools/libxl/xl.c +++ b/tools/libxl/xl.c @@ -590,7 +590,7 @@ skip_vfb: if (!xlu_cfg_get_long (config, "pci_power_mgmt", &l)) pci_power_mgmt = l; - if (xlu_cfg_get_list (config, "pci", &pcis, 0)) { + if (!xlu_cfg_get_list (config, "pci", &pcis, 0)) { *num_pcidevs = 0; *pcidevs = NULL; while ((buf = xlu_cfg_get_listitem (pcis, *num_pcidevs)) != NULL) { -- 2.30.2